import 'package:flutter/material.dart';

enum PPGroupArrawDirection {
  /// 向右
  right,

  /// 向下
  bottom,
}

class PPGroupTheme {
  PPGroupTheme({
    Color? backgroundColor,
    TextStyle? headTitleTextStyle,
    TextStyle? titleTextStyle,
    TextStyle? subTitleTextStyle,
    TextStyle? contentTextStyle,
    TextStyle? disableTextStyle,
    TextStyle? hintTextStyle,
    TextStyle? editTextStyle,
    TextStyle? editDisableTextStyle,
    EdgeInsets? groupPadding,
    EdgeInsets? textFieldCcontentPadding,
    this.crossAxisAlignment = CrossAxisAlignment.center,
  })  : _backgroundColor = backgroundColor,
        _headTitleTextStyle = headTitleTextStyle,
        _titleTextStyle = titleTextStyle,
        _groupPadding = groupPadding,
        _textFieldCcontentPadding = textFieldCcontentPadding,
        _contentTextStyle = contentTextStyle,
        _disableTextStyle = disableTextStyle,
        _hintTextStyle = hintTextStyle,
        _editTextStyle = editTextStyle,
        _editDisableTextStyle = editDisableTextStyle,
        _subTitleTextStyle = subTitleTextStyle;

  CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center;

  /// 表单项整体背景色
  /// default color is Colors.White
  final Color? _backgroundColor;

  /// 左侧标题文本样式
  final TextStyle? _headTitleTextStyle;

  final TextStyle? _titleTextStyle;

  final TextStyle? _subTitleTextStyle;

  /// 右侧 主要内容样式
  final TextStyle? _contentTextStyle;

  /// 不可修改内容展示
  final TextStyle? _disableTextStyle;

  /// 右侧 输入、选择提示文本样式
  final TextStyle? _hintTextStyle;

  ///
  final TextStyle? _editTextStyle;
  final TextStyle? _editDisableTextStyle;

  /// 表单项 当有星号标识 上下右边距
  final EdgeInsets? _groupPadding;

  final EdgeInsets? _textFieldCcontentPadding;

  Color get backgroundColor => _backgroundColor ?? Colors.white;

  TextStyle get headTitleTextStyle =>
      _headTitleTextStyle ??
      const TextStyle(
        fontSize: 14,
        fontWeight: FontWeight.w600,
      );

  TextStyle get titleTextStyle =>
      _titleTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF333333),
      );

  TextStyle get subTitleTextStyle =>
      _subTitleTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF999999),
      );

  TextStyle get contentTextStyle =>
      _contentTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF333333),
      );

  TextStyle get disableTextStyle =>
      _disableTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF999999),
      );

  TextStyle get hintTextStyle =>
      _hintTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF999999),
      );

  EdgeInsets get groupPadding =>
      _groupPadding ??
      const EdgeInsets.only(
        left: 0.0,
        top: 0.0,
        right: 0.0,
        bottom: 0.0,
      );

  EdgeInsets get textFieldCcontentPadding =>
      _textFieldCcontentPadding ?? const EdgeInsets.symmetric(vertical: 10);

  TextStyle get editTextStyle =>
      _editTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF333333),
      );

  TextStyle get editDisableTextStyle =>
      _editDisableTextStyle ??
      const TextStyle(
        fontSize: 14,
        color: Color(0xFF999999),
      );
}
